const Router = require('koa-router')
const { authenticateToken } = require('../middleware/authMiddleware') // 导入中间件
const UserController = require('../controllers/user')
const UploadController = require('../controllers/upload')
const router = new Router({ prefix: '' })

// 公共模块
router.get('/getCaptcha', UserController.getCaptcha) // 获取验证码接口
router.post('/upload', authenticateToken, UploadController.uploadFile) // 上传文件接口（需要认证）

module.exports = router
